//
//  DataOption.h
//  Chart
//
//  Created by CaoJun on 13-5-31.
//
//

#ifndef __Chart__DataOption__
#define __Chart__DataOption__

#include "YTXConfig.h"
#include <map>
#include <string>

#import <Foundation/Foundation.h>

namespace ytx{
    class DataOption{
    private:
        std::map<std::string, std::string> option;
        std::string routing;
        std::string url;
    public:
        const static std::string REQUEST_OPTION_TYPE;
        const static std::string REQUEST_OPTION_ROUTING;
        const static std::string REQUEST_OPTION_ROUTINGSPACE;
        const static bool REQUEST_OPTION_ISRandom;
        
        int timeout;
        
        DataOption(std::map<std::string, std::string> option, std::string routing, std::string url = "", int timetout=YTXConfig::getInstance()->communicate.timeout);
        
        std::string getUrl() const;
//        std::string toString() const;
        
        NSDictionary* toDictonary() const;
    };
}

#endif /* defined(__Chart__DataOption__) */
